import { createSSRApp } from "vue";
// 引入vant组件库
import {
	Tabbar,
	TabbarItem,
	Button,
	Progress,
	NavBar,
	Swipe,
	SwipeItem,
	CountDown,
	Icon,
	Card,
	Popup,
	PasswordInput,
	Tab,
	Step, Steps,
	Tabs,
	Tag,
	Loading,
	Notify,
	Image as VanImage,
	Stepper,
	NumberKeyboard, PullRefresh,
	Field, Form, CellGroup, Checkbox, NoticeBar
} from "vant";
import "vant/lib/index.css";
// 引入公共样式
import "./common.scss";
// import "amfe-flexible";
// 全局组件
//头部返回体
import commonNavBar from './components/navBar/index.vue'
//地址
import commonAddressEdit from "./components/addressEdit/index.vue";
//商品信息
import commonShopPro from "./components/shopPro/index.vue";
//联系我们按钮
import commonContactUs from "./components/contactUs/index.vue";
//订单信息
import commonOrderInfo from "./components/orderInfo/index.vue";
//底部操作体
import commonOperate from "./components/operate/index.vue";
import App from "./App.vue";
// 引入状态管理器
import Store from './store/index'
export function createApp() {
	const app = createSSRApp(App);
	app.component("navBar", commonNavBar);
	app.component("addressEdit", commonAddressEdit);
	app.component("shopPro", commonShopPro);
	app.component("ContactUs", commonContactUs);
	app.component("orderInfo", commonOrderInfo);
	app.component("Operate", commonOperate);
	app.use(Button)
		.use(Progress)
		.use(NavBar)
		.use(Step)
		.use(Steps)
		.use(Swipe)
		.use(SwipeItem)
		.use(CountDown)
		.use(Notify)
		.use(Icon)
		.use(Popup)
		.use(Tabbar)
		.use(TabbarItem)
		.use(Tab)
		.use(Loading)
		.use(Tabs)
		.use(Tag)
		.use(PasswordInput)
		.use(VanImage)
		.use(Stepper)
		.use(Card)
		.use(Store)
		.use(NumberKeyboard)
		.use(Field)
		.use(PullRefresh)
		.use(Form)
		.use(CellGroup)
		.use(NoticeBar)
		.use(Checkbox)
	return {
		app,
	};
}